<?php
function jsonpResponse($result)
{
    echo $_GET['callback'] . '(' . json_encode($result) . ')'; exit;
}

if (isset($_GET['callback']) && isset($_GET['id']) && isset($_GET['lang'])
	&& file_exists($file = sprintf('../static/jsonp_%s_%s.html', $_GET['id'], $_GET['lang']))
) {

	jsonpResponse(Array(
		'success' => true,
		'html' => file_get_contents($file)
	));

} else {

	jsonpResponse(Array(
		'success' => false
	));

}
